#if !defined(AFX_IESHELLCOMBOBOX_H__1EABA279_32DD_4A2D_8957_F478E4D3E5EB__INCLUDED_)
#define AFX_IESHELLCOMBOBOX_H__1EABA279_32DD_4A2D_8957_F478E4D3E5EB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ShellComboBox.h : header file
//

#include "ShellPidl.h"
//#include "ShellListCtrl.h"

/////////////////////////////////////////////////////////////////////////////
// CShellComboBox window

class CShellComboBox : public CComboBoxEx,public CShellPidl
{
// Construction
public:
	CShellComboBox();

// Attributes
public:
	LPITEMIDLIST GetSelectedPidl();
	//void SetShellListCtrl(CShellListCtrl * pListCtrl) { m_pListCtrl = pListCtrl; }
	virtual void OnPopulateCompelet(){}

// Operations
public:
	void Populate(LPITEMIDLIST pidlAbsSel=NULL);
	void Populate(CString szPath);
	const CString GetPathName();
	void Reload();

protected:
	void BuildFolderList(LPSHELLFOLDER pFolder,LPITEMIDLIST pidl,LPITEMIDLIST pidlAbsSel,int nIndent);
	void InitItems(LPITEMIDLIST pidlAbsSel);
	void LoadItems(LPITEMIDLIST pidlAbsSel);
	void SetShellImageList();
	int AddItem(const CShCMSort *pItem);
	void DeleteItemData(LPTVITEMDATA pItemData);
	void DeleteAllItemData();
	void AddItems(vecCMSort &vItems,IShellFolder* pFolder,LPITEMIDLIST pidlAbs,int nIndent);
	void AddFolder(vecCMSort &vItems,const SHFILEINFO &FileInfo,LPITEMIDLIST pidlAbs,LPITEMIDLIST pidl,LPSHELLFOLDER pFolder,int nIndent);
	void SelectionChanged(bool bEnter=false);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShellComboBox)
	public:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CShellComboBox();

	// Generated message map functions
protected:
	//{{AFX_MSG(CShellComboBox)
	afx_msg void OnDestroy();
	afx_msg void OnSelChange();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
public:
	LPMALLOC			m_pMalloc;
	LPITEMIDLIST		m_pidNetWork;
	LPITEMIDLIST		m_pidlMyComputer;
	LPITEMIDLIST		m_pidlMyDocuments;
	LPITEMIDLIST		m_pidlControls;
	LPITEMIDLIST		m_pidlInternet;
	LPITEMIDLIST		m_pidlSel;
	CShellPidl			m_ShellPidl;
	vecItemData			m_vecItemData;
	vecCMSort			m_vItems;
    HIMAGELIST			m_hImageList;
	CImageList			m_ImageList;
	//CShellListCtrl	*	m_pListCtrl;
	HICON				m_hIcon;
	CString				m_sText;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_IESHELLCOMBOBOX_H__1EABA279_32DD_4A2D_8957_F478E4D3E5EB__INCLUDED_)
